package com.tjetc.字节流;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class T02FileinputStream {
    public static void main(String[] args) throws IOException {
        //开管
        FileInputStream inputStream = new FileInputStream(new File("myfile"));
        byte[] bytes = new byte[1024];
        //每次接多少滴水
        int num;
        while ((num=inputStream.read(bytes))!=-1){
            System.out.println(new String(bytes,0,num));
        }
        inputStream.close();
    }
}
